Automatic Generation of Precise and Useful Commutativity Conditions (Extended Version)

نویسندگان

  • Kshitij Bansal
  • Eric Koskinen
  • Omer Tripp
چکیده

Reasoning about commutativity between data-structure operations is an important problem with applications including parallelizing compilers, optimistic parallelization and, more recently, Ethereum smart contracts. There have been research results on automatic generation of commutativity conditions, yet we are unaware of any fully automated technique to generate conditions that are both sound and effective. We have designed such a technique, driven by an algorithm that iteratively refines a conservative approximation of the commutativity (and non-commutativity) condition for a pair of methods into an increasingly precise version. The algorithm terminates if/when the entire state space has been considered, and can be aborted at any time to obtain a partial yet sound commutativity condition. We have generalized our work to left-/right-movers [27] and proved relative completeness. We describe aspects of our technique that lead to useful commutativity conditions, including how predicates are selected during refinement and heuristics that impact the output shape of the condition. We have implemented our technique in a prototype open-source tool Servois. Our algorithm produces quantifier-free queries that are dispatched to a back-end SMT solver. We evaluate Servois through two case studies: (i) We synthesize commutativity conditions for a range of data structures including Set, HashTable, Accumulator, Counter, and Stack. (ii) We consider an Ethereum smart contract called BlockKing, and show that Servois can detect serious concurrency-related vulnerabilities and guide developers to construct robust and efficient implementations. Note: This is an extended version of our paper, which appears in TACAS 2018 [8].

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Automatic Generation of Precise and Useful Commutativity Conditions

Reasoning about commutativity between data-structure operations has been, and remains, an important problem with applications including parallelizing compilers, optimistic parallelization and, more recently, Ethereum smart contracts. There have been research results on automatic generation of commutativity conditions, yet we are unaware of any fully automated technique to generate conditions th...

متن کامل

A survey on Automatic Text Summarization

Text summarization endeavors to produce a summary version of a text, while maintaining the original ideas. The textual content on the web, in particular, is growing at an exponential rate. The ability to decipher through such massive amount of data, in order to extract the useful information, is a major undertaking and requires an automatic mechanism to aid with the extant repository of informa...

متن کامل

Commutativity Condition Refinement

We present a technique for automatically generatingcommutativity conditions from (abstract-level) data-structurespecifications. We observe that one can pose the commutativityquestion in a way that does not introduce additional quantifiers,via a mechanized lifting of a (potentially partial) specificationto an equivalent total specification. We then describe an al-gorithm ...

متن کامل

Automatic Design of Persian Typefaces

In this paper , a fast method for automatic generation and scientific design of Persian letters is proposed. Scientific typeface design is an approach in which fonts are described by mathematical curves with well-defined parameters, where these parameters can be automatically tuned. METAFONT is a language suitable for the type of design used in this work. This language is particularly useful i...

متن کامل

Automatic Design of Persian Typefaces

In this paper&#10, a fast method for automatic generation and scientific design of Persian letters is proposed. Scientific typeface design is an approach in which fonts are described by mathematical curves with well-defined parameters, where these parameters can be automatically tuned. METAFONT is a language suitable for the type of design used in this work. This language is particularly useful...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • CoRR

دوره abs/1802.08748  شماره 

صفحات  -

تاریخ انتشار 2018